#include "mainwindow.h"
#include <QApplication>
#include "logger.h"
#include <QSharedMemory>
#include <QMessageBox>

int main(int argc, char *argv[])
{
    init_log();
    // single App in system
    static QSharedMemory *singleApp = new QSharedMemory("SingleApp");
    if(!singleApp->create(1)){
        LOG(ERROR)<< argv[0] <<" already run!!!" << std::endl;
        return -1;
    }
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}
